#!/bin/bash
cd /home/ubuntu/zlymes/mesmaster && \
source ~/miniconda3/etc/profile.d/conda.sh && \
conda activate mes && \
pkill -f "python manage.py runserver" 2>/dev/null; \
nohup python manage.py runserver 0.0.0.0:8004 --settings=settings_mes_basic > /tmp/mes_8004.log 2>&1 & \
nohup python manage.py runserver 0.0.0.0:8005 --settings=settings_full_mes > /tmp/mes_8005.log 2>&1 & \
nohup python manage.py runserver 0.0.0.0:8006 --settings=settings_django_with_mes > /tmp/mes_8006.log 2>&1 & \
sleep 5 && \
echo "MES服务启动完成！" && \
echo "基础MES: http://175.27.138.86:8004/admin/ (admin/admin123)" && \
echo "完整MES: http://175.27.138.86:8005/admin/ (admin/admin123)" && \
echo "管理后台: http://175.27.138.86:8006/admin/ (admin/admin123)" 